﻿using System;
using System.Collections.Generic;
using System.Text;
using EnvDTE80;
using TSVNAddin.SVN;

namespace TSVNAddin.Core
{
	public class RepositoryPathFinder
	{
		private readonly SVNClientAdapter _SVNClientAdapter;

		public RepositoryPathFinder(SVNClientAdapter svnClientAdapter)
		{
			_SVNClientAdapter = svnClientAdapter;
		}

		public virtual string FindRootPath(DTE2 applicationObject)
		{
			string fileName = applicationObject.Solution.FileName;
			string respositoryPath = _SVNClientAdapter.GetRepositoryPath(fileName);

			return respositoryPath;
		}
	}
}
